﻿using PureMVC.Interfaces;
using PureMVC.Patterns.Command;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Rzc.DevPlat.Controller
{
    public class StartupCommand : SimpleCommand
    {
        public override void Execute(INotification notification)
        {
            if (!(notification.Body is FormMain))
            {
                return;
            }
            FormMain formMain = notification.Body as FormMain;
            formMain.Text = "管网管理系统";

            var iconPath = Commons.Paths.ApplicationResourcesDir + "//favorite.ico";
            formMain.uiLabelLogo.Image = System.Drawing.Image.FromFile(iconPath);
            formMain.Icon = new System.Drawing.Icon(iconPath);
            formMain.ShowIcon = true;
            formMain.uiLabelLogo.Text = string.Empty;
            base.Execute(notification);
        }
    }
}
